package yanc.app

class Menu {
    String permissionId
    String name
    String url
    String pid
    String types
    String description
    String icon
    /**
     * 映射。
     */
    static mapping = {
        table "menu"
        version false
        permissionId(column: "permission_Id", sqlType: "varchar(10)")
        name(column: "name", sqlType: "varchar(50)")
        url(column: "url", sqlType: "varchar(100)")
        pid(column: "pid", sqlType: "varchar(200)")
        types(column: "types", sqlType: "varchar(10)")
        description(column: "description", sqlType: "varchar(300)")
        icon(column: "icon", sqlType: "varchar(200)")
    }

    static constraints = {
        permissionId(nullable: false, unique: true)
        name(nullable: false, unique: true)
        url(nullable: true, unique: false)
        pid(nullable: true, unique: false)
        types(nullable: true, unique: false)
        description(nullable: true, unique: false)
        icon(nullable: true, unique: false)
    }
}
